/**
 * @description 班次管理
 * @author qiankui 2024-2-19 13:50:29
 **/

import request from '@/assets/common/js/utils/request';

/**
 * @description 获取班次列表
 * @param not
 * @return not
 * @author qiankui 2024-2-19 13:51:22
 **/
export function holidaysGetlist(data) {
    return request({
        url: 'holidays/getlist',
        method: 'post',
        data: data,
    });
}
/**
 * @description 获取考勤组列表
 * @param not
 * @return not
 * @author qiankui 2024-2-22 16:02:32
 **/
export function attendancegroupGetlist(data) {
    return request({
        url: 'attendancegroup/getlist',
        method: 'post',
        data: data,
    });
}
/**
 * @description 添加节假日
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:43:43
 **/
export function holidaysCreate(data) {
    return request({
        url: 'holidays/create',
        method: 'post',
        data: data,
    });
}
/**
 * @description 设置节假日启用状态
 * @param not
 * @return not
 * @author qiankui 2024-2-21 13:43:47
 **/
export function holidaysEnable(data) {
    var  form = new FormData();
    // form.append("api-version",1)
    form.append("id",data.id)
    form.append("enable",data.enable)
    return request({
        url: 'holidays/enable',
        method: 'post',
        data: form,
    });
}
/**
 * @description 获取导入Excel模板
 * @param not
 * @return not
 * @author qiankui 2023-5-4 16:29:56
 **/
export function holidaysGetimportholidaystoexcelteamplate() {
    return request({
        url: 'holidays/getimportholidaystoexcelteamplate',
        method: 'get',
        responseType: "arraybuffer"
        // params: data,
        // responseType: "arraybuffer"
    });
}
/**
 * @description 通过excel导入节假日
 * @param not
 * @return not
 * @author qiankui 2024-2-21 14:21:40
 **/
export function holidaysImportHolidaysInfo(filePath) {
    var  form = new FormData();
    form.append("filePath",filePath)
    return request({
        url: 'holidays/ImportHolidaysInfo',
        method: 'post',
        data: form,
    });
}
/**
 * @description 删除班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:42:07
 **/
export function holidaysDelete(id) {
    return request({
        url: `holidays/delete?id=${id}`,
        method: 'DELETE',
    });
}
/**
 * @description 更新班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 14:22:53
 **/
export function holidaysUpdate(data) {
    return request({
        url: `holidays/update/${data.id}`,
        method: 'put',
        data: data,
    });
}
